import java.util.*;

public class Teacher extends Person {
	private String roomNumber;
	private String officeHours;
	private ArrayList<String> courseList; // class taught

	public Teacher (String strUid, String strTchrId, String strFrstName, String strMidName,
					String strLstName, String strAdd1, String strAdd2, String strCty,
					String strStte, String strZp, int age, char personType, int nssn, String strEmail,
					String roomNumber, String officeHours ) {

		super(strUid, strTchrId, strFrstName, strMidName, strLstName, strAdd1, strAdd2, strCty, strStte, strZp,
				age, personType, nssn, strEmail);
		this.roomNumber = roomNumber;
		this.officeHours = officeHours;
		courseList = new ArrayList<String>();
	}

	public void setRoomNumber(String roomNumber) {
		this.roomNumber = roomNumber;
	}

	public String getRoomNumber() {
		return roomNumber;
	}

	public void setOfficeHours(String officeHours) {
		this.officeHours = officeHours;
	}

	public String getOfficeHours() {
		return officeHours;
	}

	public int numberOfCoursesTaught() {
		return courseList.size();
	}

	public ArrayList<String> getCourses() {
		return courseList;
	}

	public void addCourse(String courseName) {
		courseList.add(courseName);
	}

	public String toString() {
		int nCourses = courseList.size();
		String strCrsesTaught = new String();

		if (nCourses > 0)
			for (int n = 0; n < nCourses ; n++) {
				strCrsesTaught += courseList.get(n) ;
				if (n != nCourses-1)
					strCrsesTaught += ", ";
			}

		 return super.toString() + ", " + roomNumber + ", " + this.officeHours + ", " + nCourses + ", " + strCrsesTaught;
	}
}
